<script>
//导入应用模板，并局部注册
import appTemplates from '@/view/apptemplates';

//应用模板加载组件
export default {
  name: 'TemplateApp',
  components: appTemplates,
  props: {
    allOptions: {
      type: Object,
      default: () => {},
    },
    mode: {
      type: String,
      default() {
        return 'view';
      },
    },
  },
  data() {
    return {};
  },
  render(h) {
    if (!this.allOptions) return;
    return h(this.allOptions.info.path, {
      props: {
        options: {
          mode: this.mode,
          ...this.allOptions,
        },
      },
    });
  },
};
</script>

<style lang="less" scoped>
.datav-edit-chart {
  height: 100%;
  background-color: #e4e5e7;
  font-size: 20px;
}
</style>
